package com.fastloan.mgt.application.contract.service.impl.loanmode.mode.ry.enmus;

/**
 * @author yanwe
 * createTime 2018-01-2018/1/7 17:53
 */
public enum  RyLoanStatusEnum {

    ING(0),
    SUCCESS(1),
    FAIL(2),
    REJECT(3);

    private Integer status;

    RyLoanStatusEnum(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public static RyLoanStatusEnum getByStatus(Integer status){
        switch (status){
            case 0:
                return ING;
            case 1:
                return SUCCESS;
            case 2:
                return FAIL;
            case 3:
                return REJECT;
            default:
                throw new IllegalArgumentException("未知的放款状态:"+status);
        }
    }
}
